<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.point.business.database.model.*"%>
<%@ taglib prefix="secSL" uri="/WEB-INF/canSearchSL.tld"%>
<%@ taglib prefix="secND" uri="/WEB-INF/canSearchND.tld"%>
<%@ taglib prefix="secNO" uri="/WEB-INF/canSearchNO.tld"%>
<%@ taglib prefix="secUOPB" uri="/WEB-INF/canSearchUOPB.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Biznis.Point</title>
<link rel="icon" type="img/ico" href="images/icons/favicon.ico">
<jsp:include page="../loadResources.jsp" />
</head>
<script>
var contextPath = '<%=request.getContextPath()%>';
	$(document).ready(function() {
		$('#procedureSL').combobox({
			url : contextPath + '/servlet/AllProcedureTypesSLServlet',
			panelHeight : 'auto',
			valueField : 'value',
			textField : 'value',
			onSelect : function(record) {
				$(this).parent().find('input[type=hidden]').val(record.value);
			}
		});
	});
	$(document).keypress(function(event) {

		var keycode = (event.keyCode ? event.keyCode : event.which);
		if (keycode == '13') {
			$('#searchBtnSL').click();
		}

	});
	$(document).keypress(function(e) {
		if (e.keyCode == 27) {
			$('#dlgSLSearchDetails').dialog('close');
			$('#dlgNothingFound').dialog('close');
		}
	});
</script>
<body id="page1">
	<div id="loading-div-background">
		<div id="loading-div" class="ui-corner-all">
			<img style="height: 30px; margin: 30px;"
				src="../images/search-loading.gif" alt="Loading.." />
			<h2 style="color: gray; font-weight: normal;">Ве молиме
				почекајте....</h2>
		</div>
	</div>
	<div class="bg">
		<div class="main">


			<header> <jsp:include page="../header.jsp" />
			<div class="row-2-1">
				<nav>
				<ul class="tabMenu">
					<secNO:canSearchNO>
						<li><a href="user.jsp">Нотарски објави</a></li>
					</secNO:canSearchNO>
					<li><a class="active" href="bankruptcy.jsp">Регистар на
							правни лица</a></li>
					<secND:canSearchND>
						<li><a href="personalDocs.jsp">Лични документи</a></li>
					</secND:canSearchND>
					<secUOPB:canSearchUOPB>
						<li><a href="searchUOPB.jsp">УОПБ</a></li>
					</secUOPB:canSearchUOPB>
					<!-- <li><a href="products.html">Our Products</a></li>
						<li class="last-item"><a href="contacts.html">Contact Us</a></li> -->
				</ul>
				</nav>
			</div>
			</header>
			<section id="content">
			<div class="padding">
				<div class="box-bg">
					<div class="wrapper">
						<h3>Пребарување во регистарот на правни лица - Основање,
							Промени, Стечајни постапки, Ликвидации и др.</h3>
						<form id="searchSL" method="post" class="margin-top-20">
							<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									ЕМБС број на субјектот:</span>
								<div class="search-form pull-left">
									<input type="text" id="embs" title="Внесете минимум 6 цифри"
										class="search-input-padding login-input search-form"
										name="embs">
								</div>
							</div>
							<br>
							<!--<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									идентификациски број:</span>
								<div class="search-form pull-left">
									<input type="text" id="uuid"
										class="search-input-padding login-input search-form"
										name="uuid">
								</div>
							</div>
							<br> -->
							<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									име на постапка:</span>
								<div class="pull-left">
									<input id="procedure" type="hidden" name="procedure"> <select
										id="procedureSL" class="easyui-combobox" name="state"
										style="width: 200px;">
									</select>
								</div>
							</div>
							<!-- <div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									назив на субјектот:</span>
								<div class="search-form pull-left">
									<input type="text" id="title" onkeyup="latcyr(this)"
										class="search-input-padding login-input search-form"
										name="title">
								</div>
							</div> -->
							<div class="pull-left margin-bottom-15 full-width">
								<span style="width: 22%;"
									class="font-size-12 pull-left color-4 input-label">Внесете
									назив на субјектот, седиште, или друг опис:</span>
								<div class="search-form pull-left">
									<input type="text" id="description" onkeyup="latcyr(this)"
										class="search-input-padding login-input search-form"
										name="description">
								</div>
							</div>
							<input type="hidden" name="userId" value="${user.id}" id="userId">
							<div class="clear margin-bottom-15">
								<input style="float: left;" type="button"
									onclick="getAllActiveNotificationsSL('SL');"
									class="button-login" id="getAllAcitveNotificatins"
									value="Активни нотификации" /><input style="float: left;"
									type="button" onclick="addToSchedule();" class="button-login"
									id="addNotification" value="Пријава за нотификации" /> <input type="button" onclick="searchSL();"
									class="button-login" id="searchBtnSL" value="Пребарувај"
									alt="Пребарување на записи објавени во тековната година" /><input class="pull-right" style="margin-top:10px; margin-right	:30px;"
									type="checkbox" name="searchArchive" id="searchArchiveSL"/><span class="pull-right" style="color: black; padding-top:10px; font-size: 14px; ">Пребарувај
								и во архива</span>

							</div>
						</form>

					</div>

					<div class="wrapper">
						<span
							class="font-size-14 pull-left color-4 input-label hide bold-font"
							id="tooMuchResults"> Пронајдени се повеќе од <%=com.point.business.util.Settings
					.getValue("max.rows.per.search")%> резултати. Ви ги прикажуваме
							најновите <%=com.point.business.util.Settings
					.getValue("max.rows.per.search")%>.
						</span>
					</div>
					<div class="weapper search-list-wrapper" id="searchSLTableWrapper">
						<div class="pull-left">
							<table id="slTabelGrid" class="easyui-datagrid"
								style="width: 994px; height: 400px"
								title="Стечајни постапки и ликвидации" rownumbers="true"
								fitColumns="true" nowrap="false" autoRowHeight="true"
								singleSelect="true">
								<thead>
									<tr>
										<th field="procedure" width="80">Постапка</th>
										<th field="title" width="180">Назив</th>
										<th field="embs" width="40">ЕМБС</th>
										<th field="anounceBy" width="60">Извор</th>
										<th field="anounceDate" width="60">Датум</th>
										<!-- <th field="anounceDate" width="50">Дата на
											објава</th>
										
										<th field="slv" width="60">Број</th> -->
									</tr>
								</thead>
							</table>
							<div id="dlgSLSearchDetails" class="easyui-dialog" modal="true"
								style="width: 580px; height: 550px; padding: 10px 20px; font-size: 14px;"
								closed="true" buttons="#dlg-buttons">

								<span class="slTitle result-content-header"></span><span
									id="slProcedure" class="result-content-header"></span><br>
								<ul style="list-style: disc outside none; padding-left: 20px;">
									<li style="margin-top: 5px;"><span>Ве известуваме
											дека субјектот со бараните параметри </span><span>, има
											објавa во <span class="slAnounceBy"></span> број:
									</span><span class="slSlv"></span><span>, од </span> <span
										class="slAnounceDate"></span><span> година или/и на web
											страната на Централниот регистар на РМ на</span> <span
										class="slAnounceDate"></span><span>година.</span><br></li>
									<br>
									<span class="result-content-header">Содржина на
										објавата:</span>
									<br>
									<li style="margin-top: 5px;"><span>Тип на постапка:
									</span><span class="slProcedure result-content-header"></span><br></li>
									<li style="margin-top: 5px;"><span>Назив: </span><span
										class="slTitle result-content-header"></span><br></li>
									<li style="margin-top: 5px;"><span>ЕМБС: </span><span
										class="slEmbs"></span><br></li>
									<li style="margin-top: 5px;"><span>Објава во <span
											class="slAnounceBy"></span></span><br></li>
									<li style="margin-top: 5px;"><span>Дата на објава:
									</span><span class="slAnounceDate"></span><br></li>
									<li style="margin-top: 5px;"><span>Број на „Службен
											весник на РМ": </span><span class="slSlv"></span><span></span><br></li>
									<li style="margin-top: 5px;"><span>Објава: </span><span
										class="slDesctription"></span><br></li>
								</ul>

							</div>
							<div id="dlg-buttons">
								<a class="easyui-linkbutton calendar-target" href=""
									iconCls="icon-calendar icon-notification">Подготви календар</a>
								<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
									onclick="javascript:$('#dlgSLSearchDetails').dialog('close')">Затвори</a>
							</div>
						</div>
					</div>
					<div id="dlgNothingFound" class="easyui-dialog" modal="true"
						style="width: 400px; height: 250px; padding: 10px 20px"
						closed="true" buttons="#dlg-buttonsNothingFound">
						<div id="nothingFound"></div>
						<div id="dlg-buttonsNothingFound">
							<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
								onclick="javascript:$('#dlgNothingFound').dialog('close')">Затвори</a>
						</div>
					</div>
					<div id="allActiveNotificatins" class="easyui-dialog" modal="true"
						style="width: 600px; height: 430px; padding: 10px 20px"
						closed="true" buttons="#dlg-buttonsAllActiveNotificaions">
						<table id="allActiveNotificatinsTabelGrid" class="easyui-datagrid"
							style="width: 550px; height: 330px"
							toolbar="#notificationToolbar" title="Активни нотификации"
							rownumbers="true" fitColumns="true" nowrap="false"
							autoRowHeight="true">
							<thead>
								<tr>
									<!-- <th field="procedure" width="90">Постапка</th>
										<th field="title" width="180">Назив</th> -->
									<th field="ck" checkbox="true"></th>
									<th field="notification" width="100">Нотификација</th>
									<th field="active" width="40">Статус</th>
									<th field="searchDate" width="40">Датум</th>
								</tr>
							</thead>
						</table>
						<div id="notificationToolbar">
							<a href="#" class="easyui-linkbutton" iconCls="icon-remove"
								plain="true" onclick="deleteNotification()">Избриши
								нотификација</a>
						</div>
						<div id="dlg-buttonsAllActiveNotificaions">

							<a href="#" class="easyui-linkbutton" iconCls="icon-cancel"
								onclick="javascript:$('#allActiveNotificatins').dialog('close')">Затвори</a>
						</div>
					</div>
					<div class="wrapper search-list-wrapper" id="searchSLresults">
						<ul>
						</ul>
					</div>
				</div>
			</div>
			</section>
			<footer> <jsp:include page="../footer.jsp" /> </footer>
		</div>
	</div>
</body>
</html>